package com.yunhe.policyfulfillment.policyful.repository;

import com.yunhe.policyfulfillment.policyful.domain.AppealProcess;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName: AppealProcessRepository
 * @Description:
 * @author: GongDaCheng
 * @Date: 15:41 2021/8/24
 */
@Repository
public interface AppealProcessRepository {

    /**
     * @Description 新增诉求流程状态
     * @Param AppealProcess appealProcess
     * @Return int
     * @Date 2021/8/24 15:42
     */
    int createAppealProcess(AppealProcess appealProcess);

    /**
     * @Description 删除诉求流程状态
     * @Param int id
     * @Return int
     * @Date 2021/8/24 15:43
     */
    int deleteAppealProcessById(@Param("id") int id);

    /**
     * @Description 更新诉求状态流程
     * @Param AppealProcess appealProcess
     * @Return int
     * @Date 2021/8/24 15:43
     */
    int updateAppealProcess(AppealProcess appealProcess);

    /**
     * @Description 根据id查询诉求状态流程
     * @Param int id
     * @Return AppealProcess
     * @Date 2021/8/24 15:44
     */
    AppealProcess searchAppealProcessByPrimaryKey(@Param("id") int id);

    /**
     * @Description 根据诉求id查询该诉求的历史流程
     * @Param long appealId
     * @Return List<AppealProcess>
     * @Date 2021/8/26 17:04
     */
    List<AppealProcess> findByAppealId(long appealId);
}
